<template>
    <div class="login-container">
      <div class="login-card">
        <h1 class="login-title">用户登录</h1>
        
        <form class="login-form">
          <div class="form-group">
            <label for="username" class="input-label">用户名</label>
            <input
              id="username"
              type="text"
              class="input-field"
              placeholder="请输入用户名"
              required
            >
          </div>
  
          <div class="form-group">
            <label for="password" class="input-label">密码</label>
            <input
              id="password"
              type="password"
              class="input-field"
              placeholder="请输入密码"
              required
            >
          </div>
  
          <div class="form-actions">
            <button type="submit" class="submit-btn">
              登 录
            </button>
          </div>
        </form>
  
        <div class="utility-links">
          <a href="#" class="link-text">忘记密码?</a>
          <span class="divider">|</span>
          <a href="#" class="link-text">注册账号</a>
        </div>
      </div>
    </div>
  </template>
  
  <style>
  /* 基础重置 */
  .login-container {
    font-family: 'Segoe UI', system-ui, sans-serif;
    box-sizing: border-box;
  }
  
  /* 布局容器 */
  .login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f7fa;
    padding: 20px;
  }
  
  .login-card {
    width: 100%;
    max-width: 400px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 40px;
  }
  
  /* 标题样式 */
  .login-title {
    margin: 0 0 30px;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
  }
  
  /* 表单元素 */
  .form-group {
    margin-bottom: 20px;
  }
  
  .input-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
  }
  
  .input-field {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
  }
  
  .input-field:focus {
    outline: none;
    border-color: #646cff;
    box-shadow: 0 0 0 2px rgba(100, 108, 255, 0.2);
  }
  
  /* 按钮样式 */
  .submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #646cff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .submit-btn:hover {
    background-color: #535bf2;
  }
  
  .submit-btn:active {
    transform: translateY(1px);
  }
  
  /* 实用链接 */
  .utility-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
  }
  
  .link-text {
    color: #646cff;
    text-decoration: none;
    transition: color 0.2s;
  }
  
  .link-text:hover {
    text-decoration: underline;
  }
  
  .divider {
    margin: 0 10px;
    color: #ccc;
  }
  
  /* 响应式调整 */
  @media (max-width: 480px) {
    .login-card {
      padding: 30px 20px;
    }
  }
  </style>
  